package com.pm.mapper.official;

import com.pm.entity.po.official.OfficialComRank;
import com.pm.entity.po.official.OfficialParamPo;
import com.pm.entity.vo.official.OfficialCommonVo;
import com.pm.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OfficialComRankMapper extends BaseMapper<OfficialComRank> {

    Integer addOne(OfficialComRank officialComRank);

    Integer update(OfficialComRank officialComRank);

    void removeOne(Integer id);

    List<OfficialComRank> getList(OfficialCommonVo officialCommonVo);

    OfficialComRank getComRankByTaskIdAndTimeNode(@Param("taskId") String taskId, @Param("timeNode") String timeNode);

    void batchAdd(@Param("officialComRankList") List<OfficialComRank> officialComRankList);

    List<OfficialComRank> getRankSortList(OfficialParamPo officialParamPo);

    /**
     * 根据总分，年份，上下半年，修改平均分
     * @param officialParamPo
     */
    void updateScoreAvg(OfficialParamPo officialParamPo);

    /**
     * 批量修改综合排名数据
     * @param officialComRankList
     * @return
     */
    int batchUpdate(@Param("officialComRankList") List<OfficialComRank> officialComRankList);
}